//
//  DatePickerView.m
//  BrushFace
//
//  Created by Harry on 16/1/27.
//  Copyright © 2016年 Zzz. All rights reserved.
//

#import "DatePickerView.h"

@implementation DatePickerView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (IBAction)cancel:(id)sender {
    _cancelResult();
    [self removeFromSuperview];
}

- (IBAction)surebtn:(id)sender {
    
    NSDateFormatter *fomatter = [[NSDateFormatter alloc]init];
    [fomatter setDateFormat:@"yyyy-MM-dd"];
    NSString *dateStr = [fomatter stringFromDate:_datepicker.date];
    _result(dateStr);
    [self removeFromSuperview];
}
@end
